#include <stdio.h>

int main(){
	int n;
	long long dp[253][253] = {0};
	for(int i = 0;i<252;i++){
		for(int j = 0;j < 252;j++)dp[i][j] = 0;
	}
	while(1){
		scanf("%d",&n);
		if(n <= 0)break;
		dp[0][0] = 1;
		int start = 1;
		for(start = 1;start <= n;start ++){
			for(int i = 1;i <= start/2; i++){
				long long tmp = 0;
				if(start == 2*i)dp[start][i] = 1;
				else{
					for(int j = i;j <= n-2*i;j++){
						tmp += dp[start-2*i][j];
					}
					dp[start][i] = tmp;
				}
			}
			dp[start][start] = 1;
		}

		long long tmp = 0;
        for (int i = 1; i <= n; ++i)
            tmp += dp[n][i];
        printf("%d %lld\n", n, tmp);
	}
	return 0;
}